package com.kgc.scd.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * cart
 * @author 
 */
public class Cart implements Serializable {
    /**
     * 自增主键
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("ID")
    private Integer cartId;

    /**
     * 商品id
     */
    @ApiModelProperty("商品id")
    private String cartProid;

    /**
     * 商品数量
     */
    @ApiModelProperty("商品数量")
    private Integer cartNum;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    private String cartUid;

    private static final long serialVersionUID = 1L;

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public String getCartProid() {
        return cartProid;
    }

    public void setCartProid(String cartProid) {
        this.cartProid = cartProid;
    }

    public Integer getCartNum() {
        return cartNum;
    }

    public void setCartNum(Integer cartNum) {
        this.cartNum = cartNum;
    }

    public String getCartUid() {
        return cartUid;
    }

    public void setCartUid(String cartUid) {
        this.cartUid = cartUid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Cart other = (Cart) that;
        return (this.getCartId() == null ? other.getCartId() == null : this.getCartId().equals(other.getCartId()))
            && (this.getCartProid() == null ? other.getCartProid() == null : this.getCartProid().equals(other.getCartProid()))
            && (this.getCartNum() == null ? other.getCartNum() == null : this.getCartNum().equals(other.getCartNum()))
            && (this.getCartUid() == null ? other.getCartUid() == null : this.getCartUid().equals(other.getCartUid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCartId() == null) ? 0 : getCartId().hashCode());
        result = prime * result + ((getCartProid() == null) ? 0 : getCartProid().hashCode());
        result = prime * result + ((getCartNum() == null) ? 0 : getCartNum().hashCode());
        result = prime * result + ((getCartUid() == null) ? 0 : getCartUid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cartId=").append(cartId);
        sb.append(", cartProid=").append(cartProid);
        sb.append(", cartNum=").append(cartNum);
        sb.append(", cartUid=").append(cartUid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}